namespace A {
    interface Animal {
        name: string;
        eat(): void;
    }

    export class Dog implements Animal {
        name: string;

        constructor(name: string) {
            this.name = name;
        }

        eat() {

        }

    }

    export class Cat implements Animal {
        name: string;

        constructor(name: string) {
            this.name = name;
        }

        eat() {

        }

    }
}

let d = new A.Dog('牧羊犬')